package cn.ycc1.mymcp.sse.server;

import cn.ycc1.mymcp.sse.server.service.SseOpenMeteoService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class MyMcpSseServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(MyMcpSseServerApplication.class, args);
    }


    @Bean
    public ToolCallbackProvider weatherTools(SseOpenMeteoService sseOpenMeteoService) {
        return MethodToolCallbackProvider.builder().toolObjects(sseOpenMeteoService).build();
    }
}
